# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pywavelets
_pkgname=${pkgname#python-}
pkgver=1.8.0
pkgrel=1
pkgdesc='PyWavelets, wavelet transform module.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/PyWavelets/#files'
license=('MIT')
depends=('python' 'python-numpy')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('ef6cce59b16473f147dc85ad07cc225670b84b7d90ed251de2084ab10a1661d5fb2a4fd7d634a11299f6924c0fb8278fc5f70154e6011bdad0247ffdf0c8c4c2')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

